/**
 * 全局对象global，类似浏览器里的window
 */
console.log('propertys: ', Object.getOwnPropertyNames(global))

// 特殊变量(只在CJS模块下存在)
console.log(__dirname)
console.log(__filename)

console.log('=========')

console.log(process.version)

// 终端执行脚本，终端输入(命令行执行)
// process.stdout.write('hello')
// process.stdin.on('data', (data) => {
// 	console.log(`User input: ${data}`)
// })

const buff1 = Buffer.from('Hello, world!')
console.log('\nbuff: ', buff1.toString())
console.log('\nbuff-base64: ', buff1.toString('base64'))
